// Copyright (C) 1953-2022 NUDT
// Verilog module name - receive_window_check
// Version: V4.0.0.20220916
// Created:
//         by - fenglin 
////////////////////////////////////////////////////////////////////////////
// Description:
//         
///////////////////////////////////////////////////////////////////////////

`timescale 1ns/1ps

module receive_window_check
(
        i_clk                       ,
        i_rst_n                     ,
                                    
        iv_addr                     ,         
        iv_wdata                    ,         
        i_wr                        ,      
        i_rd                        ,                                            
        o_wr                        ,      
        ov_addr                     ,      
        ov_rdata                    , 

        i_st_rxenable               , 
        i_cyclestart               ,  
        iv_time_slot_length         ,
        iv_schedule_period          ,
                     
        iv_desp                     ,
        i_desp_wr                   ,
                                    
        ov_priority_p0              ,
        ov_bufid_p0                 ,
        ov_flowid_p0                ,
        o_descriptor_wr_p0          , 
        ov_priority_p1              ,
        ov_bufid_p1                 ,
        ov_flowid_p1                ,
        o_descriptor_wr_p1          , 
        ov_priority_p2              ,
        ov_bufid_p2                 ,
        ov_flowid_p2                ,       
        o_descriptor_wr_p2          , 
        ov_priority_p3              ,
        ov_bufid_p3                 ,
        ov_flowid_p3                ,
        o_descriptor_wr_p3          , 
        ov_priority_p4              ,
        ov_bufid_p4                 ,
        ov_flowid_p4                ,
        o_descriptor_wr_p4          , 
        ov_priority_p5              ,
        ov_bufid_p5                 ,
        ov_flowid_p5                ,
        o_descriptor_wr_p5          , 
        ov_priority_p6              ,
        ov_bufid_p6                 ,
        ov_flowid_p6                ,
        o_descriptor_wr_p6          , 
        ov_priority_p7              ,
        ov_bufid_p7                 ,
        ov_flowid_p7                ,
        o_descriptor_wr_p7          ,
        
        ov_priority_p8              ,
        ov_bufid_p8                 ,
        ov_inport_p8                ,
        o_descriptor_wr_p8          , 

        ov_priority_p9           ,
        ov_bufid_p9              ,
        ov_inport_p9             ,
        o_descriptor_wr_p9       ,
        
        ov_priority_p10           ,
        ov_bufid_p10              ,
        ov_inport_p10             ,
        o_descriptor_wr_p10       ,
        
        ov_priority_p11           ,
        ov_bufid_p11              ,
        ov_inport_p11             ,
        o_descriptor_wr_p11       ,
        
        ov_priority_p12           ,
        ov_bufid_p12              ,
        ov_inport_p12             ,
        o_descriptor_wr_p12       ,
        
        ov_priority_p13           ,
        ov_bufid_p13              ,
        ov_inport_p13             ,
        o_descriptor_wr_p13       ,
        
        ov_priority_p14           ,
        ov_bufid_p14              ,
        ov_inport_p14             ,
        o_descriptor_wr_p14       ,
        
        ov_priority_p15           ,
        ov_bufid_p15              ,
        ov_inport_p15             ,
        o_descriptor_wr_p15       ,
        
        ov_priority_p16           ,
        ov_bufid_p16              ,
        ov_inport_p16             ,
        o_descriptor_wr_p16       ,
        
        ov_priority_p17           ,
        ov_bufid_p17              ,
        ov_inport_p17             ,
        o_descriptor_wr_p17       ,
        
        ov_priority_p18           ,
        ov_bufid_p18              ,
        ov_inport_p18             ,
        o_descriptor_wr_p18       ,
        
        ov_priority_p19           ,
        ov_bufid_p19              ,
        ov_inport_p19             ,
        o_descriptor_wr_p19       ,
        
        ov_priority_p20           ,
        ov_bufid_p20              ,
        ov_inport_p20             ,
        o_descriptor_wr_p20       ,
        
        ov_priority_p21           ,
        ov_bufid_p21              ,
        ov_inport_p21             ,
        o_descriptor_wr_p21       ,
        
        ov_priority_p22           ,
        ov_bufid_p22              ,
        ov_inport_p22             ,
        o_descriptor_wr_p22       ,
        
        ov_priority_p23           ,
        ov_bufid_p23              ,
        ov_inport_p23             ,
        o_descriptor_wr_p23       ,
        
        ov_priority_p24           ,
        ov_bufid_p24              ,
        ov_inport_p24             ,
        o_descriptor_wr_p24       ,
        
        ov_priority_p25           ,
        ov_bufid_p25              ,
        ov_inport_p25             ,
        o_descriptor_wr_p25       ,
        
        ov_priority_p26           ,
        ov_bufid_p26              ,
        ov_inport_p26             ,
        o_descriptor_wr_p26       ,
        
        ov_priority_p27           ,
        ov_bufid_p27              ,
        ov_inport_p27             ,
        o_descriptor_wr_p27       ,
        
        ov_priority_p28           ,
        ov_bufid_p28              ,
        ov_inport_p28             ,
        o_descriptor_wr_p28       ,
        
        ov_priority_p29           ,
        ov_bufid_p29              ,
        ov_inport_p29             ,
        o_descriptor_wr_p29       ,
        
        ov_priority_p30           ,
        ov_bufid_p30              ,
        ov_inport_p30             ,
        o_descriptor_wr_p30       ,
        
        ov_priority_p31           ,
        ov_bufid_p31              ,
        ov_inport_p31             ,
        o_descriptor_wr_p31       ,
        
        ov_priority_p32           ,//transmit to hcp.
        ov_bufid_p32              ,
        ov_inport_p32             ,
        o_descriptor_wr_p32       ,        

        ov_bufid                    ,
        o_bufid_wr                  ,
        i_bufid_ack                 
);

// I/O
// clk & rst
input                   i_clk           ;               
input                   i_rst_n         ;         
                         
input       [18:0]      iv_addr         ;         
input       [31:0]      iv_wdata        ;         
input                   i_wr            ;         
input                   i_rd            ;         
output                  o_wr            ;         
output      [18:0]      ov_addr         ;         
output      [31:0]      ov_rdata        ;  

input                   i_st_rxenable   ; 

input                   i_cyclestart      ;         
input       [10:0]      iv_time_slot_length;
input       [10:0]      iv_schedule_period ;
      
                                      
input       [87:0]      iv_desp                  ;         
input                   i_desp_wr                ;         
                                                                                                                           
output      [2:0]       ov_priority_p0           ;
output      [8:0]       ov_bufid_p0              ;
output      [13:0]      ov_flowid_p0             ;
output                  o_descriptor_wr_p0       ;

output      [2:0]       ov_priority_p1           ;
output      [8:0]       ov_bufid_p1              ;
output      [13:0]      ov_flowid_p1             ;
output                  o_descriptor_wr_p1       ;

output      [2:0]       ov_priority_p2           ;
output      [8:0]       ov_bufid_p2              ;
output      [13:0]      ov_flowid_p2             ;
output                  o_descriptor_wr_p2       ;

output      [2:0]       ov_priority_p3           ;
output      [8:0]       ov_bufid_p3              ;
output      [13:0]      ov_flowid_p3             ;
output                  o_descriptor_wr_p3       ;

output      [2:0]       ov_priority_p4           ;
output      [8:0]       ov_bufid_p4              ;
output      [13:0]      ov_flowid_p4             ;
output                  o_descriptor_wr_p4       ;

output      [2:0]       ov_priority_p5           ;
output      [8:0]       ov_bufid_p5              ;
output      [13:0]      ov_flowid_p5             ;
output                  o_descriptor_wr_p5       ;

output      [2:0]       ov_priority_p6           ;
output      [8:0]       ov_bufid_p6              ;
output      [13:0]      ov_flowid_p6             ;
output                  o_descriptor_wr_p6       ;

output      [2:0]       ov_priority_p7           ;
output      [8:0]       ov_bufid_p7              ;
output      [13:0]      ov_flowid_p7             ;
output                  o_descriptor_wr_p7       ;

output      [2:0]       ov_priority_p8           ;
output      [8:0]       ov_bufid_p8              ;
output      [5:0]       ov_inport_p8             ;
output                  o_descriptor_wr_p8       ;

output      [2:0]       ov_priority_p9           ;
output      [8:0]       ov_bufid_p9              ;
output      [5:0]       ov_inport_p9             ;
output                  o_descriptor_wr_p9       ;
          
output      [2:0]       ov_priority_p10           ;
output      [8:0]       ov_bufid_p10              ;
output      [5:0]       ov_inport_p10             ;
output                  o_descriptor_wr_p10       ;
          
output      [2:0]       ov_priority_p11           ;
output      [8:0]       ov_bufid_p11              ;
output      [5:0]       ov_inport_p11             ;
output                  o_descriptor_wr_p11       ;
          
output      [2:0]       ov_priority_p12           ;
output      [8:0]       ov_bufid_p12              ;
output      [5:0]       ov_inport_p12             ;
output                  o_descriptor_wr_p12       ;
          
output      [2:0]       ov_priority_p13           ;
output      [8:0]       ov_bufid_p13              ;
output      [5:0]       ov_inport_p13             ;
output                  o_descriptor_wr_p13       ;
          
output      [2:0]       ov_priority_p14           ;
output      [8:0]       ov_bufid_p14              ;
output      [5:0]       ov_inport_p14             ;
output                  o_descriptor_wr_p14       ;
          
output      [2:0]       ov_priority_p15           ;
output      [8:0]       ov_bufid_p15              ;
output      [5:0]       ov_inport_p15             ;
output                  o_descriptor_wr_p15       ;
          
output      [2:0]       ov_priority_p16           ;
output      [8:0]       ov_bufid_p16              ;
output      [5:0]       ov_inport_p16             ;
output                  o_descriptor_wr_p16       ;
          
output      [2:0]       ov_priority_p17           ;
output      [8:0]       ov_bufid_p17              ;
output      [5:0]       ov_inport_p17             ;
output                  o_descriptor_wr_p17       ;
          
output      [2:0]       ov_priority_p18           ;
output      [8:0]       ov_bufid_p18              ;
output      [5:0]       ov_inport_p18             ;
output                  o_descriptor_wr_p18       ;
          
output      [2:0]       ov_priority_p19           ;
output      [8:0]       ov_bufid_p19              ;
output      [5:0]       ov_inport_p19             ;
output                  o_descriptor_wr_p19       ;
          
output      [2:0]       ov_priority_p20           ;
output      [8:0]       ov_bufid_p20              ;
output      [5:0]       ov_inport_p20             ;
output                  o_descriptor_wr_p20       ;
          
output      [2:0]       ov_priority_p21           ;
output      [8:0]       ov_bufid_p21              ;
output      [5:0]       ov_inport_p21             ;
output                  o_descriptor_wr_p21       ;
          
output      [2:0]       ov_priority_p22           ;
output      [8:0]       ov_bufid_p22              ;
output      [5:0]       ov_inport_p22             ;
output                  o_descriptor_wr_p22       ;
          
output      [2:0]       ov_priority_p23           ;
output      [8:0]       ov_bufid_p23              ;
output      [5:0]       ov_inport_p23             ;
output                  o_descriptor_wr_p23       ;
          
output      [2:0]       ov_priority_p24           ;
output      [8:0]       ov_bufid_p24              ;
output      [5:0]       ov_inport_p24             ;
output                  o_descriptor_wr_p24       ;
          
output      [2:0]       ov_priority_p25           ;
output      [8:0]       ov_bufid_p25              ;
output      [5:0]       ov_inport_p25             ;
output                  o_descriptor_wr_p25       ;
          
output      [2:0]       ov_priority_p26           ;
output      [8:0]       ov_bufid_p26              ;
output      [5:0]       ov_inport_p26             ;
output                  o_descriptor_wr_p26       ;
          
output      [2:0]       ov_priority_p27           ;
output      [8:0]       ov_bufid_p27              ;
output      [5:0]       ov_inport_p27             ;
output                  o_descriptor_wr_p27       ;
          
output      [2:0]       ov_priority_p28           ;
output      [8:0]       ov_bufid_p28              ;
output      [5:0]       ov_inport_p28             ;
output                  o_descriptor_wr_p28       ;
          
output      [2:0]       ov_priority_p29           ;
output      [8:0]       ov_bufid_p29              ;
output      [5:0]       ov_inport_p29             ;
output                  o_descriptor_wr_p29       ;
          
output      [2:0]       ov_priority_p30           ;
output      [8:0]       ov_bufid_p30              ;
output      [5:0]       ov_inport_p30             ;
output                  o_descriptor_wr_p30       ;
          
output      [2:0]       ov_priority_p31           ;
output      [8:0]       ov_bufid_p31              ;
output      [5:0]       ov_inport_p31             ;
output                  o_descriptor_wr_p31       ;
          
output      [2:0]       ov_priority_p32           ;//transmit to hcp.
output      [8:0]       ov_bufid_p32              ;
output      [5:0]       ov_inport_p32             ;
output                  o_descriptor_wr_p32       ;

output      [8:0]       ov_bufid                 ;
output                  o_bufid_wr               ;
input                   i_bufid_ack              ;

wire        [9:0]       wv_time_slot_tsc2other   ;

wire                    w_descriptor_wr_ism2pdd  ;
wire        [32:0]      wv_outportbm_ism2pdd     ;
wire        [2:0]       wv_priority_ism2pdd      ;
wire        [8:0]       wv_bufid_ism2pdd         ;
wire        [13:0]      wv_flowid_ism2pdd        ;
wire        [5:0]       wv_inport_ism2pdd        ;
wire                    w_discard_ism2pdd        ;

wire        [15:0]      wv_receive_slot_error_cnt_ism2cpe;

command_parse_and_encapsulate_rwc command_parse_and_encapsulate_rwc_inst(
.i_clk                       (i_clk              ),       
.i_rst_n                     (i_rst_n            ),      

.iv_addr                     (iv_addr            ),         
.iv_wdata                    (iv_wdata           ),         
.i_wr                        (i_wr               ),      
.i_rd                        (i_rd               ),        

.o_wr                        (o_wr               ),      
.ov_addr                     (ov_addr            ),      
.ov_rdata                    (ov_rdata           ),      

.iv_st_overflow_error_cnt    ( ),
.iv_st_underflow_error_cnt   ( ),
.iv_receive_slot_error_cnt   (wv_receive_slot_error_cnt_ism2cpe)
);

time_slot_calculation time_slot_calculation_inst(
.i_clk                       (i_clk),
.i_rst_n                     (i_rst_n),
         
.i_cycle_start               (i_cyclestart      ),
.iv_time_slot_length         (iv_time_slot_length),
.iv_slot_period              (iv_schedule_period ),
         
.ov_time_slot                (wv_time_slot_tsc2other    ),
.o_time_slot_switch          (  )       
);

time_window_check time_window_check_inst(
.i_clk                       (i_clk                 ),
.i_rst_n                     (i_rst_n               ),
                             
.iv_desp                     (iv_desp               ),
.i_desp_wr                   (i_desp_wr             ),
                                                    
.iv_time_slot                (wv_time_slot_tsc2other),
                             
.o_descriptor_wr             (w_descriptor_wr_ism2pdd),
.ov_outportbm                (wv_outportbm_ism2pdd   ),
.ov_priority                 (wv_priority_ism2pdd    ),
.ov_bufid                    (wv_bufid_ism2pdd       ),
.ov_flowid                   (wv_flowid_ism2pdd      ),
.ov_inport                   (wv_inport_ism2pdd),
.o_discard                   (w_discard_ism2pdd      ),                           
.ov_receive_slot_error_cnt   (wv_receive_slot_error_cnt_ism2cpe)
);

packet_descriptor_discard packet_descriptor_discard_inst(
.i_clk                   (i_clk  ),
.i_rst_n                 (i_rst_n),

.i_descriptor_wr         (w_descriptor_wr_ism2pdd),
.iv_outportbm            (wv_outportbm_ism2pdd   ),
.iv_priority             (wv_priority_ism2pdd    ),
.iv_bufid                (wv_bufid_ism2pdd       ),
.iv_flowid               (wv_flowid_ism2pdd      ),
.iv_inport               (wv_inport_ism2pdd),
.i_discard               (w_discard_ism2pdd      ),

.ov_priority_p0          (ov_priority_p0         ),
.ov_bufid_p0             (ov_bufid_p0            ),
.ov_flowid_p0            (ov_flowid_p0           ),
.o_descriptor_wr_p0      (o_descriptor_wr_p0     ),
.ov_priority_p1          (ov_priority_p1         ),
.ov_bufid_p1             (ov_bufid_p1            ),
.ov_flowid_p1            (ov_flowid_p1           ),
.o_descriptor_wr_p1      (o_descriptor_wr_p1     ),
.ov_priority_p2          (ov_priority_p2         ),
.ov_bufid_p2             (ov_bufid_p2            ),
.ov_flowid_p2            (ov_flowid_p2           ),
.o_descriptor_wr_p2      (o_descriptor_wr_p2     ),
.ov_priority_p3          (ov_priority_p3         ),
.ov_bufid_p3             (ov_bufid_p3            ),
.ov_flowid_p3            (ov_flowid_p3           ),
.o_descriptor_wr_p3      (o_descriptor_wr_p3     ),
.ov_priority_p4          (ov_priority_p4         ),
.ov_bufid_p4             (ov_bufid_p4            ),
.ov_flowid_p4            (ov_flowid_p4           ),
.o_descriptor_wr_p4      (o_descriptor_wr_p4     ),
.ov_priority_p5          (ov_priority_p5         ),
.ov_bufid_p5             (ov_bufid_p5            ),
.ov_flowid_p5            (ov_flowid_p5           ),
.o_descriptor_wr_p5      (o_descriptor_wr_p5     ),
.ov_priority_p6          (ov_priority_p6         ),
.ov_bufid_p6             (ov_bufid_p6            ),
.ov_flowid_p6            (ov_flowid_p6           ),
.o_descriptor_wr_p6      (o_descriptor_wr_p6     ),
.ov_priority_p7          (ov_priority_p7         ),
.ov_bufid_p7             (ov_bufid_p7            ),
.ov_flowid_p7            (ov_flowid_p7           ),
.o_descriptor_wr_p7      (o_descriptor_wr_p7     ),
.ov_priority_p8          (ov_priority_p8         ),
.ov_bufid_p8             (ov_bufid_p8            ),
.ov_inport_p8            (ov_inport_p8           ),
.o_descriptor_wr_p8      (o_descriptor_wr_p8     ),

.ov_priority_p9           (ov_priority_p9      ),
.ov_bufid_p9              (ov_bufid_p9         ),
.ov_inport_p9             (ov_inport_p9        ),
.o_descriptor_wr_p9       (o_descriptor_wr_p9  ),
 
.ov_priority_p10          (ov_priority_p10     ) ,
.ov_bufid_p10             (ov_bufid_p10        ) ,
.ov_inport_p10            (ov_inport_p10       ) ,
.o_descriptor_wr_p10      (o_descriptor_wr_p10 ) ,

.ov_priority_p11          (ov_priority_p11     ) ,
.ov_bufid_p11             (ov_bufid_p11        ) ,
.ov_inport_p11            (ov_inport_p11       ) ,
.o_descriptor_wr_p11      (o_descriptor_wr_p11 ) ,

.ov_priority_p12          (ov_priority_p12     ) ,
.ov_bufid_p12             (ov_bufid_p12        ) ,
.ov_inport_p12            (ov_inport_p12       ) ,
.o_descriptor_wr_p12      (o_descriptor_wr_p12 ) ,

.ov_priority_p13          (ov_priority_p13     ) ,
.ov_bufid_p13             (ov_bufid_p13        ) ,
.ov_inport_p13            (ov_inport_p13       ) ,
.o_descriptor_wr_p13      (o_descriptor_wr_p13 ) ,

.ov_priority_p14          (ov_priority_p14     ) ,
.ov_bufid_p14             (ov_bufid_p14        ) ,
.ov_inport_p14            (ov_inport_p14       ) ,
.o_descriptor_wr_p14      (o_descriptor_wr_p14 ) ,

.ov_priority_p15          (ov_priority_p15     ) ,
.ov_bufid_p15             (ov_bufid_p15        ) ,
.ov_inport_p15            (ov_inport_p15       ) ,
.o_descriptor_wr_p15      (o_descriptor_wr_p15 ) ,

.ov_priority_p16          (ov_priority_p16     ) ,
.ov_bufid_p16             (ov_bufid_p16        ) ,
.ov_inport_p16            (ov_inport_p16       ) ,
.o_descriptor_wr_p16      (o_descriptor_wr_p16 ) ,

.ov_priority_p17          (ov_priority_p17     ) ,
.ov_bufid_p17             (ov_bufid_p17        ) ,
.ov_inport_p17            (ov_inport_p17       ) ,
.o_descriptor_wr_p17      (o_descriptor_wr_p17 ) ,

.ov_priority_p18          (ov_priority_p18     ) ,
.ov_bufid_p18             (ov_bufid_p18        ) ,
.ov_inport_p18            (ov_inport_p18       ) ,
.o_descriptor_wr_p18      (o_descriptor_wr_p18 ) ,

.ov_priority_p19          (ov_priority_p19     ) ,
.ov_bufid_p19             (ov_bufid_p19        ) ,
.ov_inport_p19            (ov_inport_p19       ) ,
.o_descriptor_wr_p19      (o_descriptor_wr_p19 ) ,

.ov_priority_p20          (ov_priority_p20     ) ,
.ov_bufid_p20             (ov_bufid_p20        ) ,
.ov_inport_p20            (ov_inport_p20       ) ,
.o_descriptor_wr_p20      (o_descriptor_wr_p20 ) ,

.ov_priority_p21          (ov_priority_p21     ) ,
.ov_bufid_p21             (ov_bufid_p21        ) ,
.ov_inport_p21            (ov_inport_p21       ) ,
.o_descriptor_wr_p21      (o_descriptor_wr_p21 ) ,

.ov_priority_p22          (ov_priority_p22     ) ,
.ov_bufid_p22             (ov_bufid_p22        ) ,
.ov_inport_p22            (ov_inport_p22       ) ,
.o_descriptor_wr_p22      (o_descriptor_wr_p22 ) ,

.ov_priority_p23          (ov_priority_p23     ) ,
.ov_bufid_p23             (ov_bufid_p23        ) ,
.ov_inport_p23            (ov_inport_p23       ) ,
.o_descriptor_wr_p23      (o_descriptor_wr_p23 ) ,

.ov_priority_p24          (ov_priority_p24     ) ,
.ov_bufid_p24             (ov_bufid_p24        ) ,
.ov_inport_p24            (ov_inport_p24       ) ,
.o_descriptor_wr_p24      (o_descriptor_wr_p24 ) ,

.ov_priority_p25          (ov_priority_p25     ) ,
.ov_bufid_p25             (ov_bufid_p25        ) ,
.ov_inport_p25            (ov_inport_p25       ) ,
.o_descriptor_wr_p25      (o_descriptor_wr_p25 ) ,

.ov_priority_p26          (ov_priority_p26     ) ,
.ov_bufid_p26             (ov_bufid_p26        ) ,
.ov_inport_p26            (ov_inport_p26       ) ,
.o_descriptor_wr_p26      (o_descriptor_wr_p26 ) ,

.ov_priority_p27          (ov_priority_p27     ) ,
.ov_bufid_p27             (ov_bufid_p27        ) ,
.ov_inport_p27            (ov_inport_p27       ) ,
.o_descriptor_wr_p27      (o_descriptor_wr_p27 ) ,

.ov_priority_p28          (ov_priority_p28     ) ,
.ov_bufid_p28             (ov_bufid_p28        ) ,
.ov_inport_p28            (ov_inport_p28       ) ,
.o_descriptor_wr_p28      (o_descriptor_wr_p28 ) ,

.ov_priority_p29          (ov_priority_p29     ) ,
.ov_bufid_p29             (ov_bufid_p29        ) ,
.ov_inport_p29            (ov_inport_p29       ) ,
.o_descriptor_wr_p29      (o_descriptor_wr_p29 ) ,

.ov_priority_p30          (ov_priority_p30     ) ,
.ov_bufid_p30             (ov_bufid_p30        ) ,
.ov_inport_p30            (ov_inport_p30       ) ,
.o_descriptor_wr_p30      (o_descriptor_wr_p30 ) ,

.ov_priority_p31          (ov_priority_p31     ) ,
.ov_bufid_p31             (ov_bufid_p31        ) ,
.ov_inport_p31            (ov_inport_p31       ) ,
.o_descriptor_wr_p31      (o_descriptor_wr_p31 ) ,

.ov_priority_p32          (ov_priority_p32     ) ,//transmit to hcp.
.ov_bufid_p32             (ov_bufid_p32        ) ,
.ov_inport_p32            (ov_inport_p32       ) ,
.o_descriptor_wr_p32      (o_descriptor_wr_p32 ) ,

.ov_bufid                (ov_bufid               ),
.o_bufid_wr              (o_bufid_wr             ),
.i_bufid_ack             (i_bufid_ack            )
);
endmodule